import React, { Component } from "react";

class Child1 extends Component {
  state = {
    count: 10,
  };
  handleClick() {
    this.props.onGetCount(this.state.count);
  }
  render() {
    console.log(this);
    return (
      <>
        <div>child1 - {this.state.count}</div>
        <button onClick={this.handleClick.bind(this)}>btn</button>
      </>
    );
  }
}

export default Child1;
